package com.hoshiicloud.saleorder.feign;

import com.hoshiicloud.saleorder.feign.hystrix.HystrixIdGeneratorFeignFallback;
import java.util.Set;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author zhangshuhu
 * @title: IdGeneratorService
 * @projectName hoshiicloud
 * @description: 主键服务
 * @since 2019-05-24
 */
@FeignClient(name = "hoshiicloud-id-generator", fallback = HystrixIdGeneratorFeignFallback.class)
public interface IdGeneratorService {

    /**
     * 获取主键
     *
     * @return String
     */
    @GetMapping("/getuuId")
    String queryGeneratorId();

    /**
     * 获取uuid
     *
     * @param count count
     * @return Set
     */
    @RequestMapping(value = "/getuuIdSet")
    Set<String> queryGeneratorIds(@RequestParam("count") Integer count);

}
